package com.episode.duetapi.utils;

public class ResultTools {


    public static ResultModel getDataResult(Object object) {
        return new ResultModel(ResultCode.DATA_SUCCESS.getCode(), ResultCode.DATA_SUCCESS.getMsg(), object);
    }

    public static ResultModel getDataResult(int code, Object object) {
        return new ResultModel(code, "处理成功", object);
    }

    public static ResultModel getDataResult(int code, String msg, Object object) {
        return new ResultModel(code, msg, object);
    }

    public static ResultModel getDataResult(ResultCode resultCode) {
        return new ResultModel(resultCode.getCode(), resultCode.getMsg(), null);
    }


}
